﻿@model KL.Store.Web.Models.ContactModel
@using KL.Store.Core

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/" + Parameters.Layout + ".cshtml";    
}
@section account {
    @{ Html.RenderAction("Account", "Partials"); }}
@section info {
    @{ Html.RenderAction("Information", "Partials"); }}
<script lang="javascript" type="text/javascript">

    $(function () {

        hideAll();

        $("#service-gmail-filter").hover(function () {
            hideAll();
            $(".imp_google_form").show();
            $("#service-gmail-filter").addClass("selected");
        });

        $("#service-hotmail-filter").hover(function () {
            hideAll();
            $(".imp_hotmail_form").show();
            $("#service-hotmail-filter").addClass("selected");
        });

        $("#service-other-filter").hover(function () {
            hideAll();
            $(".imp_other_form").show();
            $("#service-other-filter").addClass("selected");
        });

    });

    function hideAll() {
        $(".imp").removeClass("selected");
        $(".imp_google_form").hide();
        $(".imp_hotmail_form").hide();
        $(".imp_other_form").hide();
    }

</script>
<link rel="Stylesheet" href="/Content/import_contact.css" type="text/css" />
<div class="breadcrumb">
    <a href="/">Ana Sayfa</a> &raquo; <a href="/Account/Index">Hesabım</a> &raquo; <a
        href="/Contact/Index">Arkadaşlarım</a>
</div>
<h2>
    Arkadaşlarım</h2>
<div class="service-filter-content">
    <ul class="service-filters">
        <li id="service-gmail-filter" class="imp selected" data-li-origin="gmail"><span class="ready-label hidden">
            Ready</span> <a title="Gmail" href="#service-gmail" class="sprite sprite-gmail">
            </a>
            <div class="service-filter-name-container">
                <div class="service-filter-name-outer">
                    <div class="service-filter-name-inner">
                        <br />
                        <a class="lnk-gmail"rel="Gmail" href="#service-gmail">Gmail</a>
                    </div>
                </div>
            </div>
        </li>
        <li id="service-hotmail-filter" class="imp" data-li-origin="hotmail"><span class="ready-label hidden">
            Ready</span> <a title="Hotmail" href="https://oauth.live.com/authorize?client_id=@(Parameters.MsnClientID)&scope=wl.basic&client_secret=@(Parameters.MsnSecretKey)&response_type=code&redirect_uri=http://localstore.com/Contact/Msn" class="sprite sprite-hotmail">
            </a>
            <div class="service-filter-name-container">
                <div class="service-filter-name-outer">
                    <div class="service-filter-name-inner">
                        <br />
                        <a class="lnk-hotmail" href="https://oauth.live.com/authorize?client_id=@(Parameters.MsnClientID)&scope=wl.basic&client_secret=@(Parameters.MsnSecretKey)&response_type=code&redirect_uri=http://localstore.com/Contact/Msn">
                            Hotmail
                        </a>
                    </div>
                </div>
            </div>
        </li>
        <li id="service-other-filter" class="imp" data-li-origin="other"><span class="ready-label hidden">
            Ready</span> <a rel="Any Email" title="Any Email" href="#service-other" class="sprite sprite-anyemail">
            </a>
            <div class="service-filter-name-container">
                <div class="service-filter-name-outer">
                    <div class="service-filter-name-inner">
                        <br />
                        <a class="lnk-other"rel="Any Email" href="#service-other">Diğer</a>
                    </div>
                </div>
            </div>
        </li>
    </ul>
    <div class="triangle">
    </div>
</div>
<div class="imp_hotmail_form">
    <br /><br /><br />
    <b>Lütfen arkadaş listenize ulaşmak için tıklayın.</b>
    <br /><br /><br />
    <br /><br /><br />
    <br /><br /><br />
</div>
@using (Html.BeginForm("Google", "Contact", FormMethod.Post, new { @class = "imp_google_form" }))
{
    <table>
        <tr>
            <td>@Html.LabelFor(model => model.UserName) :
            </td>
            <td>@Html.TextBoxFor(model => model.UserName, new { @class="txt" })
            </td>
            <td>@Html.ValidationMessageFor(model => model.UserName)
            </td>
        </tr>
        <tr>
            <td>@Html.LabelFor(model => model.Password) :
            </td>
            <td>@Html.PasswordFor(model => model.Password, new { @class = "txt" })
            </td>
            <td>@Html.ValidationMessageFor(model => model.Password)
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td colspan="2" align="left">
                <input type="submit" value="Gönder" class="post" />
            </td>
        </tr>
    </table>
    if (Model != null)
    { 
    <table>
        <thead>
            <tr>
                <td class="name">
                    Name
                </td>
                <td class="name">
                    EmailAddress1
                </td>
                <td class="name">
                    EmailAddress2
                </td>
                <td class="name">
                    Phone
                </td>
                <td class="name">
                    Details
                </td>
                <td class="name">
                    Address
                </td>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model.ContactList)
            {
                <tr>
                    <td class="name">
                        @item.Name
                    </td>
                    <td class="name">
                        @item.EmailAddress1
                    </td>
                    <td class="name">
                        @item.EmailAddress2
                    </td>
                    <td class="name">
                        @item.Phone
                    </td>
                    <td class="name">
                        @item.Details
                    </td>
                    <td class="name">
                        @item.Address
                    </td>
                </tr>
            }
        </tbody>
    </table>
    }
}
@using (Html.BeginForm("Other", "Contact", FormMethod.Post, new { @class = "imp_other_form" }))
{
    <table>
        <tr>
            <td style="width:80px">Email adresleri :
            </td>
            <td><textarea id="otherContacts" name="otherContacts" class="other-emails"></textarea>
            </td>
        </tr>
        <tr>
            <td>&nbsp;
            </td>
            <td style="text-align:left">
                Lütfen email adreslerini "," veya ";" ile ayrılacak şekilde<br/>yazarak "Gönder" butonuna basınız.<br/>
            </td>
        </tr>
        <tr>
            <td>&nbsp;
            </td>
            <td style="text-align:left">
                <input type="submit" value="Gönder" />
            </td>
        </tr>
    </table>
}